import com.google.appengine.api.datastore.*

def key = KeyFactory.createKey("article",Long.parseLong(params["id"]))
def entity = datastore.get(key)

entity << params.subMap(["title", "content"])

datastore.withTransaction{
	entity.save()
}

request['message'] = "文章修改成功!"

redirect "/editlist/1"